package com.keta.foundation.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;



@Entity
@Table(name = "t_file_resource")
public class FileResource implements Serializable {

	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;

	/**
	 * 主键
	 */
	/**
	 * 文件二进制数据
	 */
	@Column(updatable = false)
	private byte[] file;
	
	/**
	 * 文件类型
	 */
	@Length(max = 30)
	@Column(length = 30,updatable = false)
	private String fileType;
	
	/**
	 * 文件名
	 */
	@Length(max = 255)
	@Column(length = 255)
	private String name;
	
	/**
	 * 文件尺寸
	 */
	@Length(max = 50)
	@Column(length = 50,updatable = false)
	private String size;
	
	/**
	 * 唯一标示
	 */
	@Length(max = 50)
	@Column(length = 50,updatable = false)
	private String uuid;
	
	/**
	 * 存储类型
	 */
	@Length(max = 20)
	@Column(length = 20,updatable = false)
	private String storeType;
	
	/**
	 * 上传时间
	 */
	@Column(length = 19)
	@Temporal(TemporalType.TIMESTAMP)
	private Date uploadTime;
	
	
	/**
	 * set主键
	 */
	public void setId(Long id){
		this.id = id;
	}
	
	/**
	 * get主键
	 */
	public Long getId(){
		return this.id;
	}
		
	/**
	 * set文件二进制数据
	 */
	public void setFile(byte[] file){
		this.file = file;
	}
	
	/**
	 * get文件二进制数据
	 */
	public byte[] getFile(){
		return this.file;
	}
		
	/**
	 * set文件类型
	 */
	public void setFileType(String fileType){
		this.fileType = fileType;
	}
	
	/**
	 * get文件类型
	 */
	public String getFileType(){
		return this.fileType;
	}
		
	/**
	 * set文件名
	 */
	public void setName(String name){
		this.name = name;
	}
	
	/**
	 * get文件名
	 */
	public String getName(){
		return this.name;
	}
		
	/**
	 * set文件尺寸
	 */
	public void setSize(String size){
		this.size = size;
	}
	
	/**
	 * get文件尺寸
	 */
	public String getSize(){
		return this.size;
	}
		
	/**
	 * set唯一标示
	 */
	public void setUuid(String uuid){
		this.uuid = uuid;
	}
	
	/**
	 * get唯一标示
	 */
	public String getUuid(){
		return this.uuid;
	}
		
	/**
	 * set存储类型
	 */
	public void setStoreType(String storeType){
		this.storeType = storeType;
	}
	
	/**
	 * get存储类型
	 */
	public String getStoreType(){
		return this.storeType;
	}
		
	/**
	 * set上传时间
	 */
	public void setUploadTime(Date uploadTime){
		this.uploadTime = uploadTime;
	}
	
	/**
	 * get上传时间
	 */
	public Date getUploadTime(){
		return this.uploadTime;
	}
		
}
